// components/navbar/index.js
const app = getApp();
Component({
  options: {
    addGlobalClass: true,
  },
  properties: {
    pageName: String,
    showNav: {
      type: Boolean,
      value: true
    },
    showHome: {
      type: Boolean,
      value: true
    }
  },
  data: {

  },
  attached: function () {
    var that = this;
    that.setData({
      navH: app.globalData.navHeight,
      navBgcolor: app.globalData.navBgcolor,
      navTextStyle: app.globalData.navTextStyle
    })
  },
  methods: {
    navBack: function () {
      wx.navigateBack({
        delta: 1
      })
    },
    toIndex: function () {
      app.backHome();
    },
  }
})